
import ReactBox from 'grey-react-box';
import State from './State';
import * as fns from './fns';

export { default as State } from './State';
export * from './State';

export default class Controller extends ReactBox<State>{

    private static _instance: Controller;

    static get instance(): Controller {
        return Controller._instance || new Controller();
    }

    constructor() {
        super(new State());
        Controller._instance = this;
    }

    createTask = this.pipeline(fns.createTask)
    askToTop = this.pipeline(fns.askToTop)
}

